<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        // if (5 > 2) {
        //     alert("haha");
        // } else {
        //     alert("hehe");
        // }

        // 判断语句 ? 执行true的语句 : 执行false的语句
        5 > 2 ? alert("haha") : alert("hehe");
    </script>
</head>

<body>

</body>

</html>